import http from "@/common/http/interface";
import {
  mapGetters,
  mapActions
} from 'vuex';
let httpUrl = http.config.baseUrl + 'api/v1/'
export default {
  // 获取手机短信验证码
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8113412050749635
  send: data => {
    return http.request({
      url: httpUrl + "verification/send.verification.sms",
      method: "post",
      data
    });
  },
  // 登陆
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8081625703650847
  login: data => {
    return http.request({
      url: httpUrl + "user/login.user.user",
      method: "post",
      data
    });
  },
  // APP用户找回密码
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8141872301870574
  setForgetpwd: data => {
    return http.request({
      url: httpUrl + "user/set.user.forgetpwd",
      method: "post",
      data
    });
  },
  // 添加家人
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8153979186843049
  addFamily: data => {
    return http.request({
      url: httpUrl + "user/add.family",
      method: "post",
      data
    });
  },
  // 获取家人列表
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8154058584290664
  getFamily: data => {
    return http.request({
      url: httpUrl + "user/get.family",
      method: "get",
      data
    });
  },
  // 编辑家人信息
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8154000797183061
  updateFamily: data => {
    return http.request({
      url: httpUrl + "user/update.family",
      method: "post",
      data
    });
  },
  // 修改个人信息
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8197103377988295
  updateInfo: data => {
    return http.request({
      url: httpUrl + "user/update.info",
      method: "post",
      data
    });
  },
  // 个人信息
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8197059526439691
  getInfo: data => {
    return http.request({
      url: httpUrl + "user/get.info",
      method: "get",
      data
    });
  },
  // 获取用户地址列表
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8208675213534311
  getUserAddressList: data => {
    return http.request({
      url: httpUrl + "user_address/get.user.address.list",
      method: "post",
      data
    });
  },
  // 添加用户收货地址
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8207497685555732
  addUserAddressItem: data => {
    return http.request({
      url: httpUrl + "user_address/add.user.address.item",
      method: "post",
      data
    });
  },
  // 编辑用户收货地址
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8208211220201502
  setUserAddressItem: data => {
    return http.request({
      url: httpUrl + "user_address/set.user.address.item",
      method: "post",
      data
    });
  },
  // 删除用户收货地址
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8208415186245446
  delUserAddressList: data => {
    return http.request({
      url: httpUrl + "user_address/del.user.address.list",
      method: "post",
      data
    });
  },
  // 爱心相册列表
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8197009027929285
  getAlbum: data => {
    return http.request({
      url: httpUrl + "user/get.album",
      method: "get",
      data
    });
  },
  // 爱心相册添加图片
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8197045659981769
  addPhoto: data => {
    return http.request({
      url: httpUrl + "user/add.photo",
      method: "post",
      data
    });
  },
  // 爱心相册删除图片
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8197208913606822
  delPhoto: data => {
    return http.request({
      url: httpUrl + "user/del.photo",
      method: "post",
      data
    });
  },
  // 获取用户在腾讯云IM的用户信息
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8270861835387568
  getTencentUserInfo: data => {
    return http.request({
      url: httpUrl + "user/get.tencent.user.info",
      method: "get",
      data
    });
  },
  // 我的预约
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8277937072457773
  getCallLog: data => {
    return http.request({
      url: httpUrl + "user/get.call.log",
      method: "get",
      data
    });
  },
  // 获取房间id
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8754496230586048
  getRoomId: data => {
    return http.request({
      url: httpUrl + "chat/get.roomid",
      method: "get",
      data
    });
  },
  // 发起通话
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8754496983836083
  startCalling: data => {
    return http.request({
      url: httpUrl + "chat/start.calling",
      method: "post",
      data
    });
  },
  // 用户取消通话
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8368603432194160
  rejectService: data => {
    return http.request({
      url: httpUrl + "staff/reject.service",
      method: "post",
      data
    });
  },
  // 每日健康指数
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8785402229613028
  userDailyData: data => {
    return http.request({
      url: httpUrl + "liandevice/user.daily.data",
      method: "post",
      data
    });
  },
  // 获取用户活跃的腾讯云IM用户id
  // 文档地址：https://www.showdoc.com.cn/799517136031066/8974893997570808
  getTencentId: data => {
    return http.request({
      url: httpUrl + "user/get.tencent.id",
      method: "get",
      data
    });
  },
  
}
